<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<div class="AdminPageText">
List Of ChuongTrinhKhuyenMai
</div>
<table class="Grid" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th>TenChuongTrinhKhuyenMai</th>
			<th>HinhMinhHoa</th>
			<th></th>
			<th></th>
		<tr>
	</thead>
	<% for (int i=0; i<Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel.Count; i++){
		if (i % 2 != 0) {%>
		<tr class="Row" id="row-<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].ID %>">
		<% }
		else { %>
		<tr class="AlternatingRow" id="row-<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].ID %>">
		<% } %>
			<td><span style=""><%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].TenChuongTrinhKhuyenMai %></span></td>
			<td>
                <object width="435" height="101" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
                    <param value="../../Content/Images/Items/<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].HinhMinhHoa %>" name="movie"/>
                    <param value="High" name="quality"/>
                    <param value="FFFFFF" name="bgcolor"/>
                    <param value="../../Content/Images/Items/<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].HinhMinhHoa %>" name="src"/>
                    <param value="transparent" name="wmode"/>
                    <embed width="435" height="101" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent" bgcolor="#ffffff" quality="high" src="../../Content/Images/Items/<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].HinhMinhHoa %>"/>
                </object>
            </td>
			<td>
				<a href="../../Admin/DetailOfChuongTrinhKhuyenMai?id=<%= Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].ID %>">
					<span style="color: Blue; text-decoration: underline">Select</span>
				</a>
			</td>
			<td>
				<%= Ajax.ActionLink("Delete", "DeleteChuongTrinhKhuyenMai", "Admin", new { id = Model.ChuongTrinhKhuyenMaiModel.GetModel.LstObjModel[i].ID }, new AjaxOptions{Confirm = "Are you sure you want to Delete it? This action cannot be undone.", HttpMethod = "Delete", OnComplete = "jsonDelete_OnComplete"})%>
			</td>
		</tr>
	<% } %>  
</table>
<% GridPagerProperties properties = new GridPagerProperties()
	{
		PageSize = WebConfiguration.NumChuongTrinhKhuyenMaiPerPage,
		RecordCount = Model.ChuongTrinhKhuyenMaiModel.GetModel.TotalItem,
		CurrentPageIndex = Model.ChuongTrinhKhuyenMaiModel.GetModel.CurrentPage,
		ActionName = "SelectChuongTrinhKhuyenMaiPaging",
		Controller = "Admin",
		UpdateTargetId = "PartialDiv"
	};
%>
<%= Ajax.GridPager(properties)%>
